Make DB the only server storage backend#42
Merged
Conversation
Remove Blob, file, and dual-write storage paths now that the app can aggressively reset non-production data. Configure Netlify and Node runtimes to use the DB store directly, keep reset tooling DB-only, remove stale seed copies, and update docs for the DB-only storage model. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ Deploy Preview for kid-a ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Temporarily run the DB reset script before the Netlify build so the next deploy initializes the schema and seed data for the DB-only storage rollout. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Apply DB migrations and seed an empty database during server startup instead of running destructive reset commands during Netlify builds. Keep the manual reset command for explicit non-production resets. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Switch DB connection setup from the legacy @netlify/neon wrapper to the current @netlify/database package while keeping Neon's query client for SQL execution. Update docs to use NETLIFY_DB_URL and ignore the local .netlify folder. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Accept NETLIFY_DB_URL, NETLIFY_DATABASE_URL, or DATABASE_URL when they contain a Postgres URL, and fail clearly if Netlify Database has not provided a usable connection string. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the custom Node server path and rely on Netlify Dev for local function and database runtime parity. Switch DB access to the current Netlify Database package with a pool-backed SQL wrapper so local Postgres URLs and deployed database URLs both work. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the custom Node server path and use Netlify Dev for local function/database parity. Configure the local Vite target to call Netlify Functions through the dev proxy and update docs/scripts accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the schema migration into netlify/database/migrations so Netlify Database detects and applies it automatically. Update runtime bootstrap, function bundling, and docs to use the native migration location. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Convert the API function from Lambda compatibility handler exports to the modern Request/Response function format with a direct /api/* config path, so Netlify Database can provide runtime connection context. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This finishes the storage migration aggressively now that existing data is non-production test data. Instead of preserving Blob/file/dual-write compatibility, the server is simplified to use Netlify DB as the only writable backend.
Summary
@netlify/blobsdependency.npm run data:reset-db, seeded fromsrc/data.server/dataseed files sosrc/datais the single seed source.Notes for review
NETLIFY_DATABASE_URLis now required for stateful Node/Netlify server paths.Validation
npm run --silent lintnpm run --silent buildnpm run --silent build:servergit --no-pager diff --check